Cache structure

ABSTRACT

A method for the distribution of digital objects ( 370 ) in a peer-to-peer network is disclosed. The digital objects ( 370 ) are distributed in a plurality of pieces ( 371 - 373 ). At least some of a plurality of peers ( 40   a - d ) are connected to other ones of the plurality of peers ( 40   a - d ) and at least one of the peers ( 40   a - d ) is connected to at least one cache ( 30 ).

FIELD OF THE INVENTION

The invention relates to caches used in the Internet. In particular, the invention relates to caches in peer-to-peer (P2P) networks for the distribution of large digital objects.

BACKGROUND TO THE INVENTION

A peer-to-peer (also termed P2P) computer network is a network that relies primarily on the computing power and bandwidth of the participants in the computer network rather than concentrating computing power and bandwidth in a relatively low number of servers. P2P computer networks are typically used for connecting nodes of the computer network via largely ad hoc connections. The P2P computer network is useful for many purposes. Sharing content files containing, for example, audio, video and data is very common. Real time data, such as telephony traffic, is also passed using the P2P network.

A pure P2P network does not have the notion of clients or servers, but only equal peer nodes that simultaneously function as both “clients” and “servers” to the other nodes on the network. This model of network arrangement differs from the client-server model in which communication is usually to and from a central server. A typical example for a non P2P file transfer is an FTP server where the client and server programs are quite distinct. In the FTP server clients initiate the download/uploads and the servers react to and satisfy these requests from the clients.

Some networks and channels, such as Napster, OpenNAP, or IRC @find, use a client-server structure for some tasks (e.g., searching) and a P2P structure for other tasks. Networks such as Gnutella or Freenet use the P2P structure for all purposes, and are sometimes referred to as true P2P networks, although Gnutella is greatly facilitated by directory servers that inform peers of the network addresses of other peers.

One of the most popular file distribution programs used in P2P networks is currently BitTorrent which was created by Bram Cohen. BitTorrent is designed to distribute large amounts of data widely without incurring the corresponding consumption in costly server and bandwidth resources. To share a file or group of files through BitTorrent, clients first create a “torrent file”. This is a small file which contains meta-information about the files to be shared and about the host computer (the “tracker”) that coordinates the file distribution. Torrent files contain an “announce” section, which specifies the URL of a tracker, and an “info” section which contains (suggested) names for the files, their lengths, the piece length used, and a SHA-1 hash code for each piece, which clients should use to verify the integrity of the data they receive.

The tracker is a server that keeps track of which seeds (i.e. a node with the complete file or group of files) and peers (i.e. nodes that do not yet have the complete file or group of files) are in a swarm (the expression for all of the seeds and peers involved in the distribution of a single file or group of files). Nodes report information to the tracker periodically and from time-to-time request and receive information about other nodes to which they can connect. The tracker is not directly involved in the data transfer and is not required to have a copy of the file. Nodes that have finished downloading the file may also choose to act as seeds, i.e. the node provides a complete copy of the file. After the torrent file is created, a link to the torrent file is placed on a website or elsewhere, and it is normally registered with the tracker. BitTorrent trackers maintain lists of the nodes currently participating in each torrent. The computer with the initial copy of the file is referred to as the initial seeder.

Using a web browser, users navigate to a site listing the torrent, download the torrent, and open the torrent in a BitTorrent client stored on their local machines. After opening the torrent, the BitTorrent client connects to the tracker, which provides the BitTorrent client with a list of clients currently downloading the file or files.

Initially, there may be no other peers in the swarm, in which case the client connects directly to the initial seeder and begins to request pieces. The BitTorrent protocol breaks down files into a number of much smaller pieces, typically a quarter of a megabyte (256 KB) in size. Larger file sizes typically have larger pieces. For example, a 4.37 GB file may have a piece size of 4 MB (4096 KB). The pieces are checked as they are received by the BitTorrent client using a hash algorithm to ensure that they are error free.

As further peers enter the swarm, all of the peers begin sharing pieces with one another, instead of downloading directly from the initial seeder. Clients incorporate mechanisms to optimize their download and upload rates. Peers may download pieces in a random order and may prefer to download the pieces that are rarest amongst it peers, to increase the opportunity to exchange data. Exchange of data is only possible if two peers have a different subset of the file. It is known, for example, in the BitTorrent protocol that a peer initially joining the swarm will send to other members of the swarm a BitField message which indicates an initial set of pieces of the digital object which the peer has available for download by other ones of the peers. On receipt of further ones of the pieces, the peer will send a Have message to the other peers to indicate that the further ones of the pieces are available for download.

Caches for the intermediate storage of data transferred about the Internet are known in the art. The most common type of cache used in the Internet is a proxy cache. The proxy cache operates at the application level, passing some messages unaltered between a client and a server, changing other ones of the messages and sometimes responding to the messages itself rather than relaying the messages. A web proxy cache sits between servers in the Internet and one or more clients and watches requests for HTML pages, images and files (collectively known as objects) pass through. The web proxy cache saves a copy of the HTML pages, images and files for itself. Subsequently if there is another request for the same object, the web proxy cache will use the copy that was saved instead of asking an origin server to resend the request.

There are three main reasons why such proxy caches are used:

i) In order to reduce latency—in this case, the request is satisfied from the cache (which is closer to the client) instead of the origin server. It therefore takes less time for the client to get the object and display the object. This makes web sites seem more responsive to the client.

ii) To reduce traffic—Each object is only retrieved once from the server once, the cache reduces the amount of bandwidth used by a client. This saves money if the client is paying for the traffic and keeps the client's bandwidth requirements lower and more manageable.

iii) To increase delivery speed.

It would be advantageous if the cache could participate in the peer-to-peer distribution network and become a member of a swarm. By becoming a member, the cache would reduce traffic, increase delivery speed and reduce latency in the peer-to-peer distribution network. In order to become a member, the cache must know about the distribution of the file.

SUMMARY OF THE INVENTION

The invention provides a method for distributing digital objects in a network, the digital objects being distributable in a plurality of pieces, wherein at least some of a plurality of peers are connected to other ones of the plurality of peers, at least one cache and the at least one of the plurality of peers is connected to at least one data source on which at least one piece of the digital objects is stored. The method comprises a first step of receiving a message relating to the digital object from a first one of the plurality of peers (40 a-d) at the at least one cache followed by a second step of checking whether meta-information relating to the digital object is available in the at least one cache. In this context the meta-information includes, but is not limited to, a list of the peers in the swarm from which pieces of the digital object are available. In a third step the meta-information is requested from a meta-information source in the event that the meta-information is unavailable in the at least one cache. Finally in a fourth step the meta-information is received at the at least one cache and a fifth step of storage of the plurality of pieces (371-373) in the at least one cache (30) based on the meta-information commences.

This method allows a cache to begin to participate in the downloading of a digital object in a peer-to-peer network and supplying pieces of the digital object to other members of the peer-to-peer network without even initially knowing about the existence of the digital object.

The invention also provides a network for the distribution of digital objects wherein the digital objects are distributable in a plurality of pieces. The network comprises: a plurality of peers in a peer-to-peer network which request the download of at least one piece of a first digital object. At least one data source is present in the network on which at least pieces of the first digital object are stored and at least one of the plurality of peers is connected to the at least one data source. The computer network comprises at least one cache with a plurality of peers being connected to the at least one cache and at least one piece of the requested piece of the first digital object is downloaded from the at least one data source to the peer. Finally at least one meta-information source (310 a-c) is provided which comprises meta-information relating to the digital object which can be downloaded to the at least one cache (30) to ensure that the at least one cache (30) knows about the digital object.

The network comprising the at least one cache can thereby comprise only one cache or a plurality of caches that may be connected to other ones of the caches. Several caches may be located in the same place or may be located on different places to provide short distance access to the peers.

The at least one cache may thereby function similar or identical to a peer in the P2P network, whereby the cache can provide higher download speed than other peers functioning as data sources. In addition, peers can quickly collect copies of a whole digital object making use of the plurality of peers downloading different pieces of the digital object in parallel, which is particularly useful with large digital objects.

The at least one cache may also be additionally connected to a network. The cache can also be connected to a data source, on which a whole digital object or pieces of a digital object are stored. The data source may also be a data source or server of a publisher wishing to distribute digital objects. Thus, the cache can act as a mirror server.

The method further may also comprise a step of delaying the requesting of some of the pieces of a digital object. For example, it may be advantageous to only pass the digital object or pieces of the digital object to the cache when a large number of peers wish to download the digital object. The decision if and when to upload digital objects could, for example, be based on the frequency of request for the download of the digital object.

DESCRIPTION OF THE FIGURES

FIG. 1 shows the structure of the cache

FIG. 2 shows a flow diagram for the downloading of data

FIG. 3 shows a further examples of the structure of the cache

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 shows the structure of the cache in accordance with the invention. The network 100 shown in FIG. 1 comprises a Peer-to-Peer (P2P) server 10 connected to Internet 20. Four users 40 a, 40 b, 40 c and 40 d are illustrated. Each of the four users 40 a-d is also connected to the Internet over connections 50 a-d. Each of the four users 40 a-d is also connected to a cache 30 over connections 60 a-d. Each of the four users 40 a-d has a local memory 45 a-d which can store data for local access and will also have a P2P client stored on their machines. Thus, each user 40 a-d is also referred to as peer 40 a-d interchangeably. However, it must be understood that the invention is applicable to a plurality of peers 40 a-d connected to multiple caches 30 and multiple P2P servers 10. Typically, one or more of the caches 30 would be connected to an access point of an Internet Service Provider.

The peers 40 a-d may also be connected to each other.

The connections 50 a-d between the peers 40 a-d and the Internet 20 are standard connections which may be implemented using any one of the standard protocols and hardware. Similarly, the connections 60 a-d between the peers 40 a-d and the cache 30 are standard connections which can be implemented using any one of the standard protocols and hardware.

Suppose that each of the peers 40 a-d wish to substantially simultaneously access a digital object 70 stored on the P2P server 10. The digital object 70 could, for example, be a new film or a television programme released for downloading. Once a release date and time for the new film or the downloadable television programme is announced, it is highly likely that a plurality of the peers 40 a-d will wish to access the new film or downloadable television programme at substantially the same time. Since the new film or downloadable television programme has recently been released it will not be present in the cache 30 and the cache 30 will not know of the existence of the digital object. Thus the peers 40 a-d will only be able to access the new film or the downloadable television programme from the P2P server 10 through the Internet 20.

The access of the digital object 70 may be described using the method shown in the flow chart of FIG. 2. At step 200, the digital object 70 is released which a number of the peers 40 a-d will be interested in accessing at step 210. Multiple requests for access (i.e. one from each of the peers 40 a-d) are sent in step 220 both to the P2P server 10 (via the connections 50 a-d and the Internet 20) and to the cache 30 (via the connections 60 a-d) and to other ones of the peers 40 a-d. The cache 30 may not contain any pieces of the digital object 70 because the large digital object 70 has recently been released (as is tested at step 230) and furthermore, as explained above, the cache (30) will not know initially of the existence of the digital object.

The multiple requests to access the P2P server 10 are passed to the P2P server 10 and for each of the multiple requests pieces of the digital object 70 are passed to each of the requesting peers 40 a-d. The pieces sent to the peers 40 a-d will be selected substantially at random and thus it is likely that whilst some of the peers 40 a-d may receive the same pieces, many of the other peers 40 a-d will receive different pieces.

At the same time, the cache 30 will request meta-information relating to the digital object in step 240. The meta-information includes, but is not limited to, an identity—such as a hash sum—for the digital object and lists of peers storing at least parts of the digital object (i.e. members of the swarm).

The peers 40 a-d receive the pieces and store the pieces locally in the local memory 45 a-d. At least one of the peers 40 a-d will upload the meta-information to the cache 30 in step 245 relating to the digital object in one example of the invention. It is possible that more than one of the peers 40 a-d will upload the meta-information. Now having the meta-information the cache 30 can itself act as a peer and may, for example, upload the pieces of the digital object into the cache 30 from the peers 40 a-d. At step 250, a check is then made to check whether all of the pieces required for the large digital object 70 are stored in the local memory 45 a-d or whether more pieces are required. In the event that more pieces are required a further request is sent for pieces of the digital object 70 at step 220.

In the meantime, the cache 30 will now have pieces stored in the cache 30 which were not previously present. As explained above, the cache 30 also acts as a peer in the network 100 and will issue a message to the other peers in the network 100 to inform the other peers that it now has pieces. This is done, in the BitTorrent protocol, by sending a BitField message and/or a Have message. Similar messages are available in other protocols. When the peers 40 a-40 d in the network 100 receive the message the peers 40 a-40 d commence sending requests for the pieces to the cache 30. The cache 30 will respond to these requests as shown in step 260 by sending the pieces to the peers 40 a-40 d. The cache 30 generally responds to every request received; unlike the peers 40 a-40 d the cache 30 will not choke the requests for pieces. In step 260, pieces could of course be supplied from other peers 40 a-d.

All of the peers 40 a-d are connected to both the P2P server 10 and to the cache 30. Therefore, the peers 40 a-d are continuously sending requests to the P2P server 10, to other ones of the peers 40 a-40 d and to cache 30. The peers 40 a-40 d thereby receive pieces from the P2P server 10, other ones of the peers 40 a-40 d and the cache 30. Over time, all of the pieces for the digital object 70 from the P2P server 10 will be downloaded by at least one of the peers 40 a-d and uploaded to the cache 30 from where the data (bytes) are shared with the other peers 40 a-d.

At step 270, all of the bytes required to re-create the large digital object 70 are in the local memories 45 a-d and the digital object 70 is assembled in the local memories 45 a-d.

Since the time taken to download all of the data from the P2P server 10 over the Internet 20 and the connections 50 a-d is substantially longer than the time taken to download the data from the cache 30 along the connections 60 a-d, there is a substantial time saving in the downloading of the data. In addition, download traffic on the Internet 20 can be considerably reduced as each of the pieces of the digital object 70 has to be downloaded only once from the P2P server 10 by one of the peers 40 a-40 d to finally provide a copy of the whole digital object 70 to the cache 30 and hence to all of the peers 40 a to 40 d.

The cache 30 can also download the meta-information relating to the digital object and the pieces of the digital object from the P2P server 10 without the meta-information and/or the pieces passing through the peers 40 a-d.

A publisher may provide a copy of the digital object including the meta-information to the cache 30, enabling direct download for the peer 40 a to 40 c.

The cache 30 can delay the requesting of some of the pieces of the data objects. Thus the cache 30 can supply pieces of the data object which are not available in the peers 40 a-d. When the number of pieces present in the cache 30 but not present in the peers 40 a-d falls below a certain level, then the cache 30 can request pieces of the digital object. This level depends on the digital object being downloaded or it could be a fixed number

Some of the peers 40 a-d may be each connected to different data sources 310 a-c. Each of the different data sources 310 a-c provide different pieces 371, 372 and 373 of the digital object 370. For example, the peer 40 a may, except being connected to the cache 30, be connected to the data source 310 a, for example, via the internet. The data source 310 a has only a first piece 371 of the digital object 370 available for download. The peer 40 a may be looking for the first piece 371, the peer 40 a may, also be looking for a second piece 372 and a third piece 373 which are not available on the data source 310 a he is connected to. However, as peer 40 a is requesting the first piece 371 of the digital object 370 the peer 40 a will download piece 371 to the local memory 45 a and subsequently upload it to the cache 30 (shown on FIG. 1), wherefrom, it is available for download to all the peers 40 a-d.

In parallel, the peer 40 b may also wish to download digital object 370. As the first piece 371 of the digital object 370 is available in the cache 30, peer 40 b may download the first piece 371 of the digital object 370 from the cache 30 to the local memory 45 b. The peer 40 b may, except being connected to cache 30, also be connected to a second data source 310 b which has the second piece 372 of the digital object 370 available for download. Thus peer 40 b will download the second piece 372 of the digital object 370 from the data source 310 b, store the second piece 372 in the local memory 45 b and upload a copy of the second piece 372 to the cache 30. Thus both, the peer 40 b and the cache 30 each have the first piece 371 and the second piece 372 of the digital object 370.

Peer 40 a may now check on a regular basis the availability of the pieces of the digital object on the cache 30. The check for the availability is done by examining BitField or Have messages issued by the cache 30. The peer 40 a will identify from the BitField or Have messages that the first piece 371 and the second piece 372 of the digital object 370 are available for download in the cache 30. As the peer 40 a has already downloaded the first piece 371 the peer 40 a will now download the second piece 372.

The third peer 40 c may now wish to download the digital object 370. The third peer 40 c is connected to the cache 30 and to a third data source 310 c. The third peer 40 c now finds the first piece 371 and the second piece 372 of the digital object 370 available on the cache 30. The third peer 40 c may also find the first piece 371 and the third piece 373 available on the data source 310 c. The third peer 40 c may download the first piece 371 either from the cache 30 or from the data source 310 c depending on the download speed and fast access availability.

It is probable that access from the cache 30 is faster. Downloading from the cache 30 may be preferred as the cache 30 is always ready for download and—as explained above—generally unchokes every request for one of the pieces. However, should the cache 30 be unavailable or slow, for example, caused by large data transfers, the third peer 40 c may download the first piece 371 from the third data source 310 c. The third peer 40 c will download the second piece 372 form the cache 30 and the third piece 373 of the digital object 370. Subsequently, the third peer 40 c will upload the third piece 373 of the digital object 370 to the cache 30.

The cache 30 now has the first piece 371, the second piece 372 and the third piece 373 of the digital object 370 available for download. The first peer 40 a and the second peer 40 b may download the missing third piece 373 of the digital object 370 from the cache 30.

A fourth peer 40 d requesting to download digital object 370 may download all the three pieces 371, 372, and 373 of the digital object 370 from the cache 30 without accessing or connecting to any of the data sources 310 a-310 c. As pieces 371, 372, and 373 of the digital object 370 can be downloaded from the cache 30, the need for slow upload connections with other peer 40 a-40 c is eliminated.

It is to be understood that the example described with respect to FIG. 3 is an illustrative example and that digital object 370 may have a plurality of pieces 371, 372, 373. The plurality of pieces 371, 372 and 373 of the digital object 370 may be downloaded by many more peers 40 a-40 c. The peers 40 a-40 c may also download pieces of the digital object 370 from the data sources 310 a-c and upload pieces to the cache 30 in parallel. It is also obvious that the peer 40 a-40 c may download a large number of pieces or even all of the pieces of the digital object 370 from a single data source.

The method and the network 100 are based on a P2P network, thus, allowing any combination of downloads and uploads within the network 100.

Although this invention has been described with respect to the BitTorrent protocol, it is not intended to be limiting of the application to such a protocol. The invention is equally applicable to other protocols.

The foregoing description is that of the preferred embodiments of the invention and that various changes and modifications may be made thereto without departing from the spirit and scope of the invention. 

1. A method for distributing digital objects in a network, the digital objects being distributable in a plurality of pieces, wherein at least some of a plurality of peers are connected to other ones of the plurality of peers and at least one of the peers being connected to at least one cache, the method comprising: receiving a message relating to the digital object from a first one of the plurality of peers at the at least one cache checking whether meta-information relating to the digital object is available in the at least one cache; requesting the meta-information from a meta-information source in the event that the meta-information is unavailable in the at least one cache; receiving the meta-information at the at least one cache; and storing of the plurality of pieces in the at least one cache based on the meta-information.
 2. The method of claim 1, wherein storing of the plurality of pieces comprises obtaining pieces of the digital object from at least some of the plurality of peers.
 3. The method of claim 1, wherein the storing of the plurality of pieces comprises obtaining pieces of the digital object from the first one of the plurality of peers.
 4. The method of claim 1, wherein the storing of the plurality of pieces comprises obtaining the pieces of the digital object from at least a further cache.
 5. The method of claim 1, further comprising connecting to a tracker subsequent to receiving the meta-information to identify members of a swarm and subsequently connecting to and requesting data from at least one of the members of the swarm.
 6. The method of claim 1, further comprising connecting to a tracker subsequent to receiving the meta-information to identify members of a swarm and subsequently connecting to and transmitting data to the at least one of the members of the swarm.
 7. The method of claim 1, wherein the meta-information is selected from the group consisting of check sums, file names, file lengths, number of pieces, tracker addresses, seed addresses, server addresses, publisher information, digital signatures and piece sizes.
 8. The method of claim 1, further comprising delaying the requesting some of the pieces of some of the data objects.
 9. The method of claim 8, wherein the delaying the requesting until the at least one cache determines that the number of pieces present in the at least one cache but not present in the plurality of peers falls below a particular level
 10. The method of claim 9, wherein the particular level is individually configured per digital object
 11. The method of claim 9, wherein the particular level is a fixed number of pieces.
 12. The method of claim 9, wherein the particular level is related to the rate at which the plurality of peers are acquiring pieces of the digital object
 13. The method of claim 1, further comprising blocking the request for some of the data objects.
 14. The method of claim 1, wherein the meta-information source is selected from the group consisting of one of the plurality of peers, a further cache, a tracker, a network probe or a file-server.
 15. A Network for the distribution of digital objects, the digital objects being distributable in a plurality of pieces, the network comprising: a plurality of peers, at least some of the plurality of peers being connected to other ones of the plurality of peers; at least one data source on which at least pieces of the first digital object are stored, at least one of the plurality of peers being connected to the at least one data source; at least one cache for storing at least one piece of the digital object, whereby at least one of the plurality of peers is connected to the at least one cache; at least one meta-information source comprising meta-information relating to the digital object. wherein the meta-information is downloadable to the at least one cache.
 16. The Network of claim 15, wherein the at least one piece of the first digital object uploadable to the at least one cache is downloadable from the at least one cache.
 17. The Network of claim 15, wherein the at least one cache is additionally connected to the network.
 18. The Network of claim 15 wherein the network is a private network containing the pieces of digital objects.
 19. The Network of claim 15, wherein the at least one cache is directly connected to at least one of the data sources.
 20. The Network of claim 19, wherein the at least one cache is directly connected to at least one of the meta-information sources. 